#ifndef PMDATEBASEOPERATIONS_H
#define PMDATEBASEOPERATIONS_H

#include <QMessageBox>
#include <QSqlDatabase>
#include <QSqlError>
#include <QSqlQuery>
    
extern bool connectPMDB(QString dbName);

extern void closePMDB();

extern void removePMDB();
    
extern bool initPMDB();
    
extern int getNextProjectID();
    
extern bool addProject(int projectID, QString projectName, 
                    QString projectCreateDateTime, QString projectLastChangeDateTime);
    
extern bool deleteProject(int projectID);
    
extern bool updateProjectName(int projectID, QString projectName);
    
extern bool updateProjectLastChangeDateTime(int projectID, QString lastChangeDateTime);
    
extern bool updateProjectFlagByID(int projectID, int flagValue);
    
extern bool getOneProjectInfo(int projectID);
    
extern int getProjectIDByFlag(int falgValue);

#endif // PMDATEBASEOPERATIONS_H
